<?php if (isset($mr[0]['products_id'])){ ?>
<form action="<?php echo $this->site['base_url']?>admin_product/save_inventory" method="post">
<table cellspacing="0" cellpadding="0" class="title">
  <tr >
    <td class="title_label"><?php echo Kohana::lang('inventory_lang.tt_in_out_adjust') ?></td>
    <td align="right">
    <button type="button" name="btn_back" class="button back" onclick="location.href='<?php echo $this->site['base_url']?>admin_product'">
    <span><?php echo Kohana::lang('admin_lang.btn_back')?></span>
    </button>
    &nbsp;
    <button type="button" name="btn_list" class="button report" onclick="sm_print(frm,'<?php echo $this->site['base_url']?>admin_inventory_list/product')"/>
    <span><?php echo Kohana::lang('product_lang.lbl_product_inventory') ?></span>
    </button>
    &nbsp;
    <button type="submit" name="btn_submit" class="button save" />
    <span><?php echo Kohana::lang('admin_lang.btn_save')?></span>
    </button>
    </td>
  </tr>
</table>
<table class="form" align="center" cellspacing="0" cellpadding="5">
    <tr>
      <td width="11%"><?php echo Kohana::lang('inventory_lang.lbl_status')?>:</td>
      <td>
        <input type="radio" name="rdo_in_out" value="1" id="rdo_in_out" checked>
        <?php echo Kohana::lang('inventory_lang.lbl_in')?>
        <input type="radio" name="rdo_in_out" value="2" id="rdo_in_out">
        <?php echo Kohana::lang('inventory_lang.lbl_out')?>
        <input type="radio" name="rdo_in_out" value="3" id="rdo_in_out">
        <?php echo Kohana::lang('inventory_lang.lbl_adjust_in')?>
        <input type="radio" name="rdo_in_out" value="4" id="rdo_in_out">
        <?php echo Kohana::lang('inventory_lang.lbl_adjust_out')?>
        </td>
    </tr>
    <tr>
    	<td><?php echo Kohana::lang('product_lang.lbl_qty')?>: <font color="#FF0000">*</font></td>
    	<td><input type="text" name="txt_qty_inventory" id="txt_qty_inventory" class="text_number" size="10" value="<?php echo isset($mr['products_qty'])?$mr['products_qty']:'1'?>"/></td>
  	</tr>
    <tr>
    	<td><?php echo Kohana::lang('inventory_lang.lbl_vendor_name')?>:</td>
    	<td><input type="text" name="txt_vendor_name" id="txt_vendor_name" size="30" value="<?php echo isset($mr['vendors_name'])?$mr['vendors_name']:''?>"/></td>
  	</tr>
    <tr>
    	<td valign="top"><?php echo Kohana::lang('inventory_lang.lbl_remark')?>:</td>
    	<td><textarea name="txt_remark" id="txt_remark" cols="24" rows="3" value="<?php echo isset($mr['inventory_remark'])?$mr['inventory_remark']:''?>"></textarea>
        <input type="hidden" id="hd_id" name="hd_id" value="<?php if (isset($mr[0]['products_id'])) echo $mr[0]['products_id']; ?>">
        </td>
  	</tr>
</table>
</form>
<?php } ?>
<script language="javascript">
function set_enable_in_out(id){
	if(id == 1){
		document.getElementById('sel_input').disabled = false;
		document.getElementById('sel_output').disabled = true;	
	} else {
		document.getElementById('sel_input').disabled = true;
		document.getElementById('sel_output').disabled = false;	
	}	
}
function check_in_out(id){//alert(id);
	/*if(id == 1){
		var input = document.getElementById('sel_input');
		var str = input.options[input.selectedIndex].value;		
	} else {
		var output = document.getElementById('sel_output');
		var str = output.options[output.selectedIndex].value;
	}//alert(str);
	if(str == 'Vendor')
		document.getElementById('txt_vendor_name').disabled = false;
	else
		document.getElementById('txt_vendor_name').disabled = true;*/
}
</script>